package com.example.homeworkmutualevaluation.Dao;

import com.example.homeworkmutualevaluation.Entity.Administrator;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface AdministratorDao extends JpaRepository<Administrator, String> {
    @Query(value = "SELECT * FROM administrator WHERE `id`=?1 AND `password`=sha1(?2)", nativeQuery = true)
    Administrator find(String id, String password);
}
